<script type="text/javascript">
	$(document).ready(function() {
		$("#recievers").tablesorter({
			widthFixed: true,
			widgets: ['zebra']
		}).tablesorterPager({
			container: $(".pager")
		});
	});
</script>
<div id="main-content" class="prepend-1 span-19 last">
	<h3>Detil Beasiswa - <?php echo $scholarship->name; ?></h3>
	<table>
		<tr>
			<td width="200"><b>Nama Beasiswa</b></td>
			<td><?php echo $scholarship->name; ?></td>
		</tr>
		<tr>
			<td><b>Awal Periode</b></td>
			<td><?php echo date(MONTH_YEAR_FORMAT, strtotime($scholarship->period_start)); ?></td>
		</tr>
		<tr>
			<td><b>Akhir Periode</b></td>
			<td><?php echo date(MONTH_YEAR_FORMAT, strtotime($scholarship->period_end)); ?>
		</tr>
		<tr>
			<td><b>Batas Pengajuan</b></td>
			<td><?php echo date(DAY_FORMAT, strtotime($scholarship->deadline)); ?>
		</tr>
		<tr>
			<td><b>Keterangan</b></td>
			<td><?php echo $scholarship->details; ?></td>
		</tr>
		<tr>
			<td><b>Status</b></td>
			<td><span class="info"><?php echo $status; ?></span></td>
		</tr>
<?php 
	if ($status == 'masa seleksi') :
?>
		<tr>
			<td><b>Jumlah Pendaftar</b></td>
			<td><?php echo intval($counter['mendaftar']) + intval($counter['diterima']) + intval($counter['ditolak']); ?></td>
		</tr>
		<tr>
			<td><b>Jumlah Pendaftar Diterima</b></td>
			<td><?php echo $counter['diterima']; ?></td>
		</tr>
		<tr>
			<td><b>Jumlah Pendaftar Ditolak</b></td>
			<td><?php echo $counter['ditolak']; ?></td>
		</tr>
<?php 
	elseif ($status == 'masa pendaftaran') :
?>
		<tr>
			<td><b>Jumlah Pendaftar</b></td>
			<td><?php echo $counter; ?></td>
		</tr>
<?php 
	else :
?>
		<tr>
			<td><b>Jumlah Penerima</b></td>
			<td><?php echo $counter; ?></td>
		</tr>
<?php 
	endif;
?>
	</table>
	<div class="clear"><?php echo nbs(); ?></div>
	<h4><?php echo $title; ?></h4>
	<table id="recievers">
	<thead>
		<tr>
			<th>Nama Mahasiswa</th>
			<th width="150">Angkatan</th>
			<th width="300">Program Studi</th>
			<th width="150"><?php echo $studentstatus; ?></th>
		</tr>
	</thead>
	<tfoot>
		<?php echo $pager; ?>
	</tfoot>
	<tbody>
<?php 
	if ($recievers == NULL) :
?>
		<tr>
			<td align="center" colspan="4">
				<span class="info"><?php echo $empty; ?></span>
			</td>
		</tr>
<?php 
	else :
		foreach ($recievers as $reciever) :
?>
		<tr>
			<td><?php echo anchor('sponsor/student/profile/index?id='.$reciever->id, $reciever->name, array('target' => '_blank')); ?></td>
			<td align="center"><?php echo $reciever->year; ?></td>
			<td><?php echo $reciever->major; ?></td>
<?php if ($status == 'masa seleksi' && ($reciever->status == 'aktif' || $reciever->status == 'non-aktif')) : ?>
			<td align="center">diterima</td>
<?php 
	elseif ($status == 'aktif' || $status == 'non-aktif') :
?>
			<td align="center"><?php echo $reciever->delivery; ?></td>
<?php 
	else : 
?>
			<td align="center"><?php echo $reciever->status; ?></td>
<?php 
	endif;
?>
		</tr>
<?php 
		endforeach;
	endif;
?>
	</tbody>
	</table>
	<div class="clear"><?php echo nbs(); ?></div>
</div>
